import { Module, VuexModule, Mutation } from "vuex-module-decorators";
@Module({
  name: "homeModule",
  stateFactory: true,
  namespaced: true,
})
export default class HomeModule extends VuexModule {
  navs: {}[] = [];
  recommends: {}[] = [];
  lives: {}[] = [];
  records: {}[] = [];
  hots: {}[] = [];

  @Mutation
  initNavs() {
    this.navs = [
      { path: "/nav1", title: "后端" },
      { path: "/nav2", title: "前端" },
      { path: "/nav3", title: "移动开发" },
      { path: "/nav4", title: "编程语言" },
      { path: "/nav5", title: "Java" },
      { path: "/nav6", title: "Python" },
      { path: "/nav7", title: "人工智能" },
      { path: "/nav8", title: "大数据" },
      { path: "/nav9", title: "数据结构与算法" },
      { path: "/nav10", title: "音视频" },
      { path: "/nav11", title: "云原生" },
      { path: "/nav12", title: "云平台" },
      { path: "/nav13", title: "运维" },
      { path: "/nav14", title: "服务器" },
      { path: "/nav15", title: "操作系统" },
      { path: "/nav16", title: "数据库管理" },
      { path: "/nav17", title: "iOS" },
      { path: "/nav18", title: "Android" },
      { path: "/nav19", title: "小程序" },
      { path: "/nav20", title: "硬件开发" },
      { path: "/nav21", title: "嵌入式" },
      { path: "/nav22", title: "微软技术" },
      { path: "/nav23", title: "软件工程" },
      { path: "/nav24", title: "测试" },
      { path: "/nav25", title: "安全" },
      { path: "/nav26", title: "网络" },
      { path: "/nav27", title: "产品/运营" },
      { path: "/nav28", title: "设计" },
      { path: "/nav29", title: "职场和发展" },
      { path: "/nav30", title: "搜索" },
      { path: "/nav31", title: "开发工具" },
      { path: "/nav32", title: "PHP" },
      { path: "/nav33", title: "游戏" },
      { path: "/nav34", title: "开放平台" },
      { path: "/nav35", title: "HarmonyOS" },
      { path: "/nav36", title: "区块链" },
      { path: "/nav37", title: "数学" },
    ];
  }
  @Mutation
  initRecommends() {
    this.recommends = [
      {
        path: "/recommend1",
        title: "C站免费「学+练」产品",
        icon: "home-recommend1-icon",
      },
      { path: "/recommend2", title: "CSDN 指数", icon: "home-recommend1-icon" },
      {
        path: "/recommend3",
        title: "让学习更有价值",
        icon: "home-recommend1-icon",
      },
      {
        path: "/recommend4",
        title: "「笔耕不辍」专属勋章活动",
        icon: "home-recommend1-icon",
      },
      {
        path: "/recommend5",
        title: "高考志愿填报有奖问答",
        icon: "home-recommend1-icon",
      },
    ];
  }
  @Mutation
  initLives() {
    this.lives = [
      {
        title: "这是一个直播",
        img: "/assets/images/home/news1.jpg",
        path: "/live-link1",
        time: "7-9 13:10",
        hot: 233,
        liveState: true,
      },
      {
        title: "这是一个没开始的直播",
        img: "/assets/images/home/news1.jpg",
        path: "/live-link2",
        time: "7-9 13:10",
        hot: 233,
        liveState: false,
      },
      {
        title: "这是又一个没开始的直播",
        img: "/assets/images/home/news1.jpg",
        path: "/live-link3",
        time: "7-9 14:33",
        hot: 233,
        liveState: false,
      },
      {
        title: "这又是一个没开始的直播",
        img: "/assets/images/home/news1.jpg",
        path: "/live-link4",
        time: "7-9 13:10",
        hot: 233,
        liveState: false,
      },
    ];
  }
  @Mutation
  initRecords() {
    this.records = [
      { path: "/newlink1", title: "维护高Star项目，会遇到什么有趣的问题", second: "副标题1" },
      { path: "/newlink2", title: "开发者收到“夹杂着间谍软件”假Offer", second: "副标题1" },
      { path: "/newlink3", title: "旧安卓机别扔，自制Web服务器了解一下！", second: "副标题1" },
      {
        path: "/newlink4",
        title: "微软疑断自由软件开发者“活路”",
        second: "副标题1",
      },

      { path: "/newlink5", title: "标题2", second: "副标题1" },
      { path: "/newlink6", title: "标题2", second: "副标题1" },
      { path: "/newlink7", title: "标题2", second: "副标题1" },
      { path: "/newlink8", title: "标题2", second: "副标题1" },

      { path: "/newlink9", title: "标题3", second: "副标题1" },
      { path: "/newlink10", title: "标题3", second: "副标题1" },
      { path: "/newlink11", title: "标题3", second: "副标题1" },
      { path: "/newlink12", title: "标题3", second: "副标题1" },
    ];
  }
  @Mutation
  initHots() {
    this.hots = [
      { path: "/hotlink1", title: "创新还是炒冷饭？低代码”十问", second: "副标题1" },
      { path: "/hotlink2", title: "罗永浩官宣新创业公司名字", second: "副标题2" },
      { path: "/hotlink3", title: "历史上的今天：台积电创始人出生", second: "副标题3" },
      {
        path: "/hotlink4",
        title: "中国红客联盟宣布解散：高层爆发内讧",
        second: "副标题1",
      },
      { path: "/hotlink5", title: "3位清华姚班本科生斩获STOC最佳学生论文奖", second: "副标题1" },
      
      { path: "/hotlink6", title: "标题2", second: "副标题1" },
      { path: "/hotlink7", title: "标题2", second: "副标题1" },
      { path: "/hotlink8", title: "标题2", second: "副标题1" },
      { path: "/hotlink9", title: "标题3", second: "副标题1" },
      { path: "/hotlink10", title: "标题3", second: "副标题1" },
      
      { path: "/hotlink11", title: "标题3", second: "副标题1" },
      { path: "/hotlink12", title: "标题3", second: "副标题1" },
    ];
  }
  
}
